import { createApp } from "vue";
import App from "@/App.vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
//@ts-ignore
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import "virtual:svg-icons-register";
// 引入自定义插件对象：注册整个项目全局组件
import plugins from "@/plugins";
import "@/styles/index.scss";
import router from "./router";
import pinia from "./store";
import "./permission";
import "element-plus/theme-chalk/dark/css-vars.css";
import { isHasButton } from "@/directive/has";

// 获取应用实例对象
const app = createApp(App);
app.use(ElementPlus, {
  locale: zhCn,
});
app.use(plugins);
app.use(router);
app.use(pinia);
isHasButton(app);
// 将应用挂挂载到挂载点上
app.mount("#app");
